﻿using MyFileView.Core.Core;
using MyFileView.Shard.Model;

using System.Text.RegularExpressions;

namespace MyFileView.Core
{
    public class MappingFactoryClass
    {

        public AfterConvertPathHandle AfterConvertPathHandle { get; set; }

        public static PreviewFileResponseModel Mapping(IConvertFileFactory convertFileFactory)
        {
            
            var handle = convertFileFactory.ConvertFileContext.AfterConvertPathHandle;
            var responseData = convertFileFactory.PreviewFileResponseModel;
            // var responseData = convertFileFactory.PreviewFileResponseModel;
          //  handle.GenerateUrl(data.UrlSuffix);
            responseData.Url = handle.GenerateUrl();
            responseData.Name = handle.ConvertFileInfo.FileName;
            responseData.Width = handle.Width;
            responseData.Height = handle.Height;
            return responseData;
        }
 

    }
}
